-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix api name, english doc, unittest, and remove useless alias of 2.0 lr_scheduler #27686
fix api name, english doc, unittest, and remove useless alias of 2.0 lr_scheduler #27686
Conversation
Thanks for your contribution! |
2fb481c
to
0d90a8a
Compare
3ab4e05
to
7ea6387
Compare
31108b8
to
c301601
Compare
c301601
to
476f8e3
Compare
813be9d
to
b686e04
Compare
3f7b738
to
8e9e055
Compare
8e9e055
to
cc83284
Compare
cc83284
to
961560d
Compare
87c1785
to
db78404
Compare
db78404
to
af8a6d1
Compare
af8a6d1
to
81582b4
Compare
81582b4
to
0d34d19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
python/paddle/optimizer/optimizer.py
Outdated
paddle.disable_static() | ||
emb = paddle.nn.Embedding(10, 10) | ||
adam = paddle.optimizer.Adam(0.001, parameters = emb.parameters()) | ||
lr = adam.get_lr() | ||
print(lr) # 0.001 | ||
|
||
# example2: PiecewiseLR is used, return the step learning rate | ||
# example2: PiecewiseDecay is used, return the step learning rate | ||
paddle.disable_static() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这行可以删除
python/paddle/optimizer/optimizer.py
Outdated
@@ -370,14 +372,14 @@ def get_lr(self): | |||
|
|||
import numpy as np | |||
import paddle | |||
# example1: _LRScheduler is not used, return value is all the same | |||
# example1: LRScheduler is not used, return value is all the same | |||
paddle.disable_static() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这行可以删除
@@ -156,31 +213,29 @@ class NoamLR(_LRScheduler): | |||
verbose (bool, optional): If ``True``, prints a message to stdout for each update. Default: ``False`` . | |||
|
|||
Returns: | |||
``NoamLR`` instance to schedule learning rate. | |||
``NoamDecay`` instance to schedule learning rate. | |||
|
|||
Examples: | |||
.. code-block:: python | |||
|
|||
import paddle | |||
import numpy as np |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -262,23 +317,21 @@ class PiecewiseLR(_LRScheduler): | |||
import paddle | |||
import numpy as np |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -346,23 +399,21 @@ class NaturalExpLR(_LRScheduler): | |||
import paddle | |||
import numpy as np |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -939,23 +984,21 @@ class StepLR(_LRScheduler): | |||
import paddle | |||
import numpy as np |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -1035,23 +1078,21 @@ class LambdaLR(_LRScheduler): | |||
import paddle | |||
import numpy as np |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -1135,23 +1176,21 @@ class ReduceLROnPlateau(_LRScheduler): | |||
import paddle | |||
import numpy as np |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -1352,23 +1382,21 @@ class CosineAnnealingLR(_LRScheduler): | |||
import paddle | |||
import numpy as np |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -370,14 +372,14 @@ def get_lr(self): | |||
|
|||
import numpy as np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这行可以删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Done
0d34d19
to
d45af89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…er (PaddlePaddle#27686) * fix doc and unittest of 2.0 lr_scheduler * fix doc of 2.0 lr_scheduler * fix unittest * fix english doc of lr_scheduler * fix api name of lr scheduler * fix api name of lr scheduler
PR types
New features
PR changes
APIs
Describe